using System;
using System.Collections.Generic;
using System.Text;

using Liberty.Domain.CaseManagement;

using Microsoft.VisualStudio.TestTools.UnitTesting;
//using NUnit.Framework.SyntaxHelpers;

namespace Tests.DomainTests.CaseManagement
{
    [TestClass()]
    public class CaseVolunteerTests : Object
    {
        #region Constants
        private const string
            INJURY_DESCRIPTION = "Test Injury Description",
            TEST_DATE = "5/6/2006 1:45:09";
        #endregion

        #region Setup and Teardown CaseVoluteerTests
        [TestInitialize()]
        public void SetupCaseVolunteerTests()
        {
        }

        [TestCleanup()]
        public void TeardownCaseVolunteerTests()
        {
        }
        #endregion

        #region Test Methods
        [TestMethod()]        
        public void TestProperties()
        {
            DateTime aDate = DateTime.Parse( TEST_DATE );
            CaseVolunteer aCaseVolunteer = CaseVolunteer.TestInstance();
            aCaseVolunteer.AddCases( this.InitializeCases() );
            foreach( Case c in aCaseVolunteer.Cases )
            {
                Assert.AreEqual( aDate, c.DateOfInjury );

                foreach( Injury injury  in c.Injuries )
                {
                    Assert.AreEqual( "Test of Type of injury", injury.TypeOfInjury.Description );
                }
               
            }
        }
        #endregion

        #region Support Methods
        public List<Case> InitializeCases()
        {            
            Case aCase = Case.TestInstance();
            aCase.DateOfInjury = DateTime.Parse( TEST_DATE );

            Injury injury = Injury.TestInstance();
            aCase.AddInjury( injury );

            i_Cases = new List<Case>();             
            i_Cases.Add( aCase );
            return i_Cases;
        }
        #endregion

        #region Data Elements
        private List<Case> i_Cases = null;
        #endregion

    }
}
